Image data processing method and image processing apparatus

ABSTRACT

An image data processing method for creating a clear blur-compensated image; the method calculates the motion data between a reference image and a target image, calculates difference in pixel value between the reference image and the target image for every block matched by the motion data, calculates, based on the difference in pixel value, the blending ratio between the reference image and the target image for each block, and creates a synthesized image by synthesizing the reference image and the target image according to the motion data and the blending ratio. An image processing apparatus implementing the image data processing method noted above is also disclosed.

This application claims the benefits of foreign filing priority based onJapanese Patent Application No. 2007-341553 filed Dec. 29, 2007, theentire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image data processing method and imageprocessing apparatus for making appropriate corrections to an imageblurred due to camera shake, especially for an image with a movingsubject, through computer processing of a captured image.

2. Description of the Related Art

There exist blur-compensation technologies developed to prevent blurringof an image due to camera shake. There are various types ofblur-compensation technologies including optical correction type andimage synthesizing type. Of these technologies, image synthesizing typeof blur-compensation is suited for devices, etc. that are required to becompact since the technology does not require a corrective lens or adrive mechanism for its optical device.

In Japanese Unexamined Patent Application Publication Nos. 2003-78807and 1997-261526, technologies are proposed to compensate for blurring bycalculating the motion vector between multiple still images captured byan imaging device such as a camera.

With an image synthesizing type, motion vectors between multiple imagesare calculated first, and a relative displacement between images isobtained from the motion vectors. Then, a synthesized image is obtainedfrom an addition process utilizing applicable pixel values in themultiple images with their displacement corrected.

However, if there is a moving subject in a captured image, the locationof the subject will change between images, and existing imagesynthesizing type correction creates a synthesized image with a blurryghost-like subject in the image.

FIG. 8 is an example of a captured image using existing imagesynthesizing type of blur-compensation. Image (a) through image (d) areconsecutively captured input images. It is noticeable that themotorbike, the image's subject, is moving diagonally towards the topright corner of the image.

Image (h) is the corrected and synthesized image created using image (a)through image (d). Among photography subjects in the image (h), themotorbike that is a moving subject that appears like an after-image.

The present invention was made in view of the above issue. The object ofthis invention is to provide an image data processing method and imageprocessing apparatus where a more accurate blur-compensated image can beobtained by preventing the photographic subject from becoming indistincteven if there is a moving subject in a captured image.

SUMMARY OF THE INVENTION

In order to achieve the object, there is provided according to an aspectof the present invention, an image data processing method including amotion data computation process for calculating the motion data betweena reference image and a target image, a block comparison process forcalculating difference in pixel value between the reference image andthe target image for every block matched by the motion data, a blendingratio calculation process for calculating, based on the difference inpixel value, the blending ratio between the reference image and thetarget image for each block, and an image synthesizing process forcreating a synthesized image by synthesizing the reference image and thetarget image according to the motion data and the blending ratio.

Here, reference image is defined as an image which will be referencedduring motion data computation and image synthesizing process. For thefirst image synthesizing process, any single image from multiple inputimages will be selected to be used as reference image. As a selectioncriterion for a reference image, it could be determined based on havingthe earliest timestamp in consecutively captured images, or by comparingother parameters. For the second image synthesizing process, thepreviously synthesized image is used as the reference image.

Also, target images are images other than a reference image among inputimages which will be used in the image data processing of thisinvention. A target image is used to calculate motion data with respectto a reference image or is used in the image synthesizing process with areference image. There can be multiple target images whereby each targetimage is processed with respect to a reference image.

The present invention obtains a motion data between a reference imageand a target image. Motion data indicates the relative displacementbetween the images, including displacement of the entire images, and themotion of each feature point or each block.

Here, the blending ratio for two images to calculate the pixel value forthe synthesized image, is defined as the ratio of pixel values from eachimage and it includes 0% and 100% for 0, 1 determinations serving as thedecision whether to perform blending or not as well as intermediaryvalues between 0% and 100%. Blending ratio is determined per block basedon the difference in the pixel values between a reference image and atarget image for each block. The effect of a target image on a referenceimage can be reduced by using a lower blending ratio if a block's pixelvalue difference is significant. Thus, if there is a moving subject inan image block, then the difference in pixel values between images willbe significant, and this process with the lower blending ratio willreduce the impact of the moving subject on a synthesized image.

Preferably, the blending ratio calculation process should correct theonce calculated blending ratio based on the blending ratio ofneighboring blocks. For example, take any block (say block A) and if itsblending ratio is below a predetermined threshold, check whetherneighboring blocks have blending ratios that are above the threshold,and if such block(s) exist, then adjust the blending ratio of thoseneighboring block(s) to be the same as the blending ratio of block A, orreduce the target image blending ratio of those neighboring block(s)according to the number of surrounding blocks with blending ratios thatare below the threshold.

This method allows a synthesized image to have sharp edges even on amoving subject.

According to another aspect of the present invention, the image dataprocessing method uses a synthesized image created by the imagesynthesizing process as a new reference image, then obtains a new targetimage to perform the motion data computation process, the blockcomparison process, the blending ratio calculation process, then theimage synthesizing process and repeat these processes until there are nomore target images to be obtained, or up to a certain number of times,to create the final synthesized image.

The present invention is capable of obtaining a sharper image with lessnoise by blending multiple images. This is especially true for blocksthat are blended numerous times, as that part of the image becomessharper.

According to another aspect of the present invention, the image dataprocessing method performs noise reduction process, changing thecoefficient or method of noise reduction for every block based on theblending ratio.

Noise reduction is a process that smoothes out the random noise in animage. A coefficient can be used to change the noise reduction effect,or the noise reduction method itself can be changed. Examples of noisereduction methods include but are not restricted to median filters andGaussian filters.

Also, “based on the blending ratio” means “depending on at least a ratioof a reference image and a target image for creating each block of asynthesized image”, for example this is determined by the number ofimages whose blending ratio are above a certain threshold. In this case,the blending ratio can be determined according to the number of imagesused to create the synthesized image if each image is weighed equally.Therefore, “based on the blending ratio” can include cases where it isbased on the number of images used in the synthesizing process.

A natural looking synthesized image with small distribution of noiseoverall can be obtained by solving the difference in noise levelsbetween images that blend many and few blocks by changing thecoefficient or method of noise reduction for each block based on itsblending ratio.

According to another aspect of the present invention, an imageprocessing apparatus including a motion data computation unit forcalculating the motion data between a reference image and a targetimage, a block comparison unit for calculating difference in pixel valuebetween the reference image and the target image for every block matchedby the motion data, a blending ratio calculation unit for calculating,based on the difference in pixel value, the blending ratio between thereference image and the target image for each block, and an imagesynthesizing unit for creating a synthesized image by synthesizing thereference image and the target image according to the motion data andthe blending ratio.

According to the present invention, sharper blur-compensated images canbe obtained by isolating blocks in a captured image containing a movingsubject and altering their blending ratio when creating a synthesizedimage. Also, noise reduction coefficient or method can be changed basedon this blending ratio, which will decrease the scattering of noise in asynthesized image and can homogenize image quality.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram for the image processing apparatusrelating to this embodiment of the present invention.

FIG. 2 is a flow chart of image data process for this embodiment of thepresent invention.

FIG. 3 is a diagram describing an example of motion data.

FIG. 4 is a diagram describing corresponding blocks.

FIG. 5 is a diagram with an overview of the image synthesizing processfor this embodiment of the present invention.

FIG. 6 is a synthesized image before the noise reduction process.

FIG. 7 is a synthesized image after the noise reduction process.

FIG. 8 is images describing image synthesizing with existing technology.

FIG. 9 is a diagram with a specific example of the adjustment processfollowing the determination of blending ratio in Step S105.

FIG. 10 is a diagram with an overview of the image synthesizing processfor the second embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments in accordance with this invention will bedescribed below.

FIG. 1 is a block diagram of image processing apparatus 2 of thisembodiment. This apparatus takes multiple images as input, thensynthesizes these images together to create a blur-compensated image.

Image processing apparatus 2 includes memory device 14 and computationalprocessing device 16.

Computational processing device 16 includes image data input unit 36,image synthesizing processing unit 18, noise reduction unit 20, andimage data output unit 22.

Image data input unit 36 receives image data from an external source andstores it in memory device 14. At this time, image data input unit 36selects an input image as a reference image for use in image comparisonand synthesizing, and stores it as such with the remaining images storedas target images. Image synthesizing processing unit 18 performs thesynthesizing of a reference image and a target image. Noise reductionunit 20 applies noise reduction filters to a synthesized image toeliminate noise in a synthesized image. Image data output unit 22outputs the noise reduced synthesized image as the final output image.

Image synthesizing processing unit 18 includes motion data detectionunit 38, block comparison unit 40, blending ratio computation unit 42,and image synthesizing unit 44.

Motion data detection unit 38 computes the motion data between multipleinput images. Block comparison unit 40 compares corresponding blocksbetween a reference image and a target image to compute the pixel valuedifferences for each block. Blending ratio computation unit 42 uses thepixel value differences calculated in block comparison unit 40 tocalculate the blending ratio for each block of each target image. Imagesynthesizing unit 44 uses the calculated motion data and blending ratiodata by synthesizing multiple target images together with a referenceimage to create a synthesized image. Noise reduction unit 20 appliesnoise reduction filters on a synthesized image to eliminate noise in thesynthesized image. Image data output unit 22 outputs the noise reducedsynthesized image as the final output image.

Memory device 14 includes image data storage unit 10 and parametersstorage unit 12. Image data storage unit 10 stores output image data 28which is in the final and output form of synthesized image data 26created by image synthesizing processing unit 18 which uses input imagedata 24 obtained from image data input unit 36. Parameters storage unit12 stores motion data 30 which is the displacement between a referenceimage and a target image, pixel value differences data 32 which is thepixel value differences between each corresponding block of a referenceimage and a target image, and blending ratio data 34 which is the ratioof blending between a reference data and a comparison data as well asthe ratio of blending for each corresponding block.

Next, actions taken by this embodiment of the image processing apparatusis described using the flowchart in FIG. 2.

<Step S101>

Image data input unit 36 obtains multiple images captured by an externalimaging device, and then stores them in image data storage device 10.Input images are consecutively captured images, and in this embodiment,input images are described as being FIG. 8 (a) through (d).

<Step S102>

Motion data detection unit 38 makes one of the input images a referenceimage, and one of the remaining images a target image. In thisembodiment, an image that was captured the earliest is used as areference image, and the next earliest image is a target image. In theFIG. 8 example, the images are in chronological order from (a) to (d),therefore at this step (a) is the reference image and (b) is the targetimage.

<Step S103>

Motion data detection unit 38 computes motion data between a referenceimage and a target image. Motion data can be motion vectors indicatingamount of parallel displacement such as relative displacement between areference image and a target image as in FIG. 3 (a), or affineparameters with multi-degrees of freedom that are more capable ofdetecting motion such as rotational motion as in FIG. 3 (b). Forexample, Japanese Unexamined Patent Application Publication 2007-226643describes a technology where after performing multi-resolutionprocessing of an input image, block matching process is performed fromthe lowest resolution image to the highest, thus obtaining a highlyaccurate affine parameters, this technology can be utilized to computethe motion data between a reference image and a target image.

<Step S104>

Block comparison unit 40 adjusts the displacement between a referenceimage and a target image by using motion data obtained in Step S103,then divides each image into specific blocks, and then computes thedifference of the sum of pixel values for each corresponding block. FIG.4 indicates a state where a reference image and a target image aredivided into blocks. Block A of the reference image corresponds to blockB of the target image in the comparison data after adjusting thedisplacement according to the motion data. Here, the difference in thesums of each pixel value in block A and block B is calculated. Forspecific example of dividing into blocks, 16 by 16 pixel blocks are usedto process images that are 200 megapixels to 500 megapixels in size. Theblock size can be altered depending on such factors as processingapparatus, necessary processing speed, and size of images.

The equation in this process, as follows, uses pixel values I(p) andI(q) where coordinate (p) is in block A and coordinate (q) is in blockB.

$\begin{matrix}{\frac{{{\sum\limits_{p \in A}{I(p)}} - {\sum\limits_{q \in B}{I(q)}}}}{\sum\limits_{p \in A}1}\;} & \left\lbrack {{Equation}\mspace{14mu} 1} \right\rbrack\end{matrix}$

In order to reduce the amount of calculation needed to calculate the sumof the pixel values in a block, pixel skipping can be utilized in thecalculation. This reduces the accuracy of the decisions made betweenblocks, but speeds up processing.

<Step S105>

Blending ratio computation unit 42 computes the blending ratio for eachblock of a target image onto a reference image based on the differencein pixel values per each block as computed in block comparison unit 40.The computed blending ratio is stored in parameters storage device 12 asblending ratio data for each block of each image (S105). In thisembodiment, if the difference in total pixel values obtained in StepS104 is above a certain threshold, then no blending action of targetimage onto reference image will be performed for that block. At thistime, the blending ratio for this block of the target image is 0.Therefore, for each pixel in this block, when creating the synthesizedimage, the pixel intensity values will be set as reference image 1 andtarget image 0.

If the difference of pixel values is less than the threshold, blendingratio is determined so that the effect of each target image on areference image is the same. FIG. 5 shows an example where the finalsynthesized image is created from 4 input images. In the first part ofStep S105, image (a) is the reference image and image (b) is the targetimage and the blending ratio is determined for each corresponding block.At this point, if the difference in pixel values between the blocksbeing compared is less than the threshold, the synthesized image created(e) will be composed of image (a) and image (b) in 1:1 ratio, and theblending ratio for both image (a) and image (b) are 1/2 respectively.

Now, the required threshold value at this point should be able todetermine whether the difference in sums of pixel values is not theresult of noise but of change in subject captured in the block. In thisembodiment, it is set at ⅛ of the maximum pixel value; however, thisvalue is based on experience. For example, if each pixel is capable of256 values, then the threshold will be set to 32. However, this is onlyone example, and an appropriate value should be selected depending onfactors such as image capturing device.

Details will be described later, however if there is still a targetimage(s) remaining after creating a synthesized image, the synthesizedimage will become the new reference image, and a new synthesized imagewill be created with a new target image (S102 after S108).

<S105 from the Second Iteration>

In the case of FIG. 5, this refers to the process steps where image (e)and image (c) are synthesized together to obtain image (f) in theprocess, and also the synthesizing of image (f) and image (d) togetherto obtain image (g). When synthesizing image (e) and image (c) together,if the difference in pixel values for a specific block is above notedthreshold, the impact of image (c)'s block should be equal to the impactof blocks from image (a) and image (b), therefore image (c)'s blendingratio will be set to 1/3 and image (e)'s blending ratio will be 2/3.Therefore, if the synthesized image used as the reference image iscomposed of N images (where N is a positive integer), then the blendingratio of the reference image is N/(N+1) and the blending ratio for thetarget image is 1/(N+1).

Other than the above computational method, blending ratio can be basedon the difference of sums of pixel values.

For example, if the difference is 0, a reference image and a targetimage are set as 1:1 with each blending ratio being 1/2, and theblending ratio of a reference image can be computed to increase as thedifference increases.

<Blending Ratio Adjustment (S105)>

When determining the blending ratio; and if a corresponding block in atarget image for a block in a reference image does not exist, then donot perform the blending processing, and use the reference image blockas the synthesized image block.

Also, after determining blending ratios for all blocks, if there are anyblocks whose blending ratio is set to 0, meaning target image will notbe blended with reference image, then also set all immediatelysurrounding blocks' blending ratios to 0. This makes the synthesizingprocess more accurate for blocks that contain an edge of a movingsubject. This is indicated in FIG. 9.

Block X₁ includes a part of the moving subject 300 within the referenceimage. Block X₂ in the target image corresponds to block X₁ in thereference image. For these blocks, if the difference in sum of pixelvalues is obtained using Step S104, since the moving subject's impact issmall the difference will also be small. Therefore in Step S105, theblending ratio will be set to perform blending of the block's pixelvalues. At this time, the pixel values for a part of the moving subjectin block X₁ will be set to synthesize with a weak value.

In the blending ratio adjustment of this embodiment, the block to theright of block X₁ will not be blending, therefore block X₁ will also notbe blending, and this solves the issue of having one part of the movingsubject synthesizing with a weak value.

<Step S106>

Image synthesizing unit 44 performs additions of reference image pixelvalues and corresponding target image pixel values for each referenceimage block weighing by the blending ratio determined in Step S105. Oncethe addition process has been completed for all blocks of the referenceimage, the synthesized image is created. Synthesized image is stored inimage data storage device 10 as synthesized image data.

At this time, the method for creating a synthesized image considers thepixel value of coordinate (x, y) of synthesized image block A to be A(x, y), and considering the displacement between images, thecorresponding pixels in target image block B are B(x+dx, y+dy), andfurther, the blending ratio of block B to block A is “α” which means thefollowing.A(x,y)=(1−α)A(x,y)+αB(x+dx,y+dy)  [Equation 2]

Now, in the above example, the displacement between block A and block Bis calculated as a vector (dx, dy), but this can also be calculatedusing affine parameters.

<Steps S107 and S108>

After the creation of a synthesized image, image synthesizing processingunit 18 refers to image data storage device 10 to check whether thereare remaining target images (S107). If there is a new target image (Y inS107), image synthesizing processing unit 18 uses the synthesized imagecreated in Step S106 as a new reference image, and selects input imagedata not yet used for image synthesizing as a new target image, andstarts the image synthesizing process with these two images (S108).

FIG. 5 is an example that shows the outline of processing of Step S101to Step 108 in this embodiment, where the diagram describes how 1reference image and 3 target images are used to create the finalsynthesized image. In FIG. 5, Mx(x:a-f) is the blending ratio of image(x). By performing Step S101 to Step S106 on reference image (a) andtarget image (b), synthesized image (e) is obtained. Step S107determines whether there are any more target images available. Since atarget image is available, in Step S108, synthesized image (e) becomes anew reference image with respect to a new target image (c) and theprocess is resumed at Step S103. By repeating the process from Step S103to Step S106, a new synthesized image (f) is obtained. Step S107 repeatsuntil it is determined that there are no more target images available,thereby finally obtaining synthesized image (g).

<Step S109>

Noise reduction unit 20 sets a noise reduction coefficient based on thenumber of images used to synthesize each block and performs a noisereduction filtering process (S109). Existing technology is used as anoise reduction method. For example, known noise reduction methodsinclude bilateral filter, Gaussian filter, and median filter.

When deciding on the noise reduction coefficient, if the number ofimages used in synthesizing the image is large, reduce the noisereduction coefficient so that noise reduction filter's effect is weak.If the number of images used is small, then use a large noise reductioncoefficient so that the noise reduction filter's effect is strong.

An example will be described where a bilateral filter is used in thisembodiment. Bilateral filters weigh pixels based on their proximity andintensity when compared to a central pixel. The weighing by distance andpixel value is generally performed using Gaussian distribution. Centralpixel is (p), reference pixel is (q), reference pixel collection is A,pixel values are I(p) and I(q), then the weight function w(p, q) basedon intensity will be as follows.

$\begin{matrix}{{w\left( {p,q} \right)} = \frac{{\mathbb{e}}^{- \frac{{({{I{(p)}} - {I{(q)}}})} + {{q - p}}^{2}}{2{\pi\sigma}_{d}^{2}}}}{\sum\limits_{q \in A}{\mathbb{e}}^{- \frac{{({{I{(p)}} - {I{(q)}}})} + {{q - p}}^{2}}{2{\pi\sigma}_{d}^{2}}}}} & \left\lbrack {{Equation}\mspace{14mu} 3} \right\rbrack\end{matrix}$

In this weight function w(p, q), coefficient σ_(d) can be altered tochange the strength of the filter. By increasing noise reductioncoefficient σ_(d) the filtering becomes stronger.

In Step S109, this coefficient σ_(d) is altered depending on the numberof images synthesized together, which alters the strength of the filter.Suppose a coefficient about a block of 1 image blending be σ and ifthere are 2 or 3 images blending, then the coefficient is set as σ/2 orσ/3 respectively. This reduces the effect of the filter on blocks thathave many images blended together, and reduces the dispersal effect ofthe difference in intensity.

Also, noise reduction coefficients can be determined depending on theimpact each image has on the final synthesized image. The impact of eachblock of each image is the product of blending ratios of eachsynthesizing process. In the FIG. 5 example, the blending ratio forimage (a) to create image (e) is expressed as M_(a), and similarlyblending ratios for image (e) and image (f) are expressed as M_(e) andM_(f), and the blending ratio of image (a) in the final synthesizedimage (g) M_(ga) is the product of M_(a), M_(e), and M_(f). Similarlyobtain values for image (b), image (c), and image (d). When there are Ninput images, noise reduction coefficient could be determined by thenumber of images that have blending ratios above the threshold value(for example 1/N).

With this process, the random noise distribution in the finalsynthesized image is resolved, and overall, a smoother and less noisyimage can be obtained. Digital images contain random noise, and whenimages are synthesized together, the noise is averaged out and the noiselevel is decreased. In this embodiment, the blending ratio differsdepending on the block, and in a block with a moving subject, its pixelvalue differs greatly from that of the target images, and the blendingratio between the reference image and the target image becomes small.Therefore, the final synthesized image will have blocks with much noiseand blocks with less noise and the difference in noise level betweenblocks will become apparent. Therefore, the noise reduction coefficientis changed from block to block to apply the filter which will equalizethe overall distribution of noise, thus obtaining a more natural image.Now, for blocks that have experienced the noise reduction due to imagesynthesizing, applying noise reduction filter on them may deterioratethe image quality, so the noise reduction filter is weakly applied ornot applied at all.

FIG. 6 is the synthesized image of image (a) through image (d) beforethe noise reduction process has been applied. The area surrounding themotorbike, the moving subject 200, has high levels of noise. In areaswhere this noise is prevalent, the noise reduction coefficient isincreased in the noise reduction process.

FIG. 7 is the result of FIG. 6 after Step S109 noise reduction process.Compared to FIG. 6, it can be seen that noise has been reduced in area200.

Noise reduction unit 20 stores the synthesized image obtained using theabove process as blur-compensated image, which is the output data, inimage data storage device 10. Image data output unit 22 outputs theoutput image data to an external device such as a display device or amemory device.

According to this embodiment, when performing blur-compensated imagesynthesizing, the difference in pixel values between each image fortheir corresponding blocks is obtained and blocks that probably containmoving subjects are identified, and during the image synthesizingprocess these blocks are not blended in, which makes it possible toperform image synthesizing while not being affected by moving subjects.Further, by applying strong noise reduction on blocks that had smalleffect from image blending or blocks that do not have any blending, thenoise level in that block is reduced, and an overall noise reductionbalanced image can be obtained.

OTHER EMBODIMENTS

A second embodiment is described here. In the first embodiment, areference image is compared to a target image while consecutivelyobtaining the next target image. In this second embodiment, Step S102 toStep S106 processes for all images are performed at the same time tocreate a synthesized image. Step S109 is performed afterwards as a noisereduction process.

FIG. 10 is a figure indicating the processing outline of thisembodiment. This example shows reference image (a) and target images(b)-(d) in the synthesizing process. For each reference image and targetimage pair, Step S103 to Step S105 are performed, and for each block ofeach image the blending ratio is determined. After determining theblending ratios, each image's corresponding pixel values are weighed byits blending ratio and added to synthesize the image. Following thecreation of the synthesized image, the noise reduction process isconducted in the same manner as in the first embodiment.

With this process, more memory is required when compared to the firstembodiment, but since each target image is compared with the referenceimage to determine their motion data and blending ratio, the synthesizedimage will more closely reflect the reference image.

Now, the present invention shall not be restricted to the aboveembodiments, and can be applied to various forms without departing fromits main purpose. For example, this can be processed over acommunication network connected to a computing device, etc. with whichimage data and motion data transfers can be conducted.

The image data processing method of the present invention can be appliedto blur-compensation device on a computer, image processing apparatusfor image synthesizing, imaging devices such as digital cameras andvideo cameras, and moving image playback devices.

What is claimed is:
 1. An image data processing method including: amotion data computation process for calculating the motion data betweena reference image and a target image; a block comparison process foradjusting displacement between the reference image and the target imageby using the motion data, dividing the reference image and the targetimage into blocks, and calculating difference in pixel value between thereference image and the target image for every block; a blending ratiocalculation process for calculating, based on the difference in pixelvalue, the blending ratio between the reference image and the targetimage for each block; an image synthesizing process for creating asynthesized image by synthesizing the reference image and the targetimage according to the motion data and the blending ratio; and a noisereduction process for applying a noise reduction filter in the obtainedsynthesized image so as to change the coefficient for every blockdepending on the number of images synthesized together; wherein, whenthe difference in the pixel value exceeds a predetermined threshold, theblending ratio is set to 0; whereby prevents a photographic subject frombecoming indistinct even if there is a moving subject in a capturedimage and obtains a blur-compensated image.
 2. The image data processingmethod according to claim 1, further including the following steps afterthe image synthesizing process: obtaining a new target image; settingthe synthesized image created by the image synthesizing process as a newreference image; and repeating the motion data computation process, theblock comparison process, the blending ratio calculation process, andthe image synthesizing process successively to create a finalsynthesized image.
 3. An image processing apparatus comprising: a motiondata computation means for calculating the motion data between areference image and a target image; a block comparison means foradjusting displacement between the reference image and the target imageby using the motion data, dividing the reference image and the targetimage into blocks, and calculating difference in pixel value between thereference image and the target image for every block; a blending ratiocalculation means for calculating, based on the difference in pixelvalue, the blending ratio between the reference image and the targetimage for each block; an image synthesizing means for creating asynthesized image by synthesizing the reference image and the targetimage according to the motion data and the blending ratio; and a noisereduction means for applying a noise reduction filter in the obtainedsynthesized image so as to change the coefficient for every blockdepending on the number of images synthesized together; wherein, whenthe difference in the pixel value exceeds a predetermined threshold, theblending ratio is set to 0; whereby prevents a photographic subject frombecoming indistinct even if there is a moving subject in a capturedimage and obtains a blur-compensated image.